package com.jk.garden1.controller;

import com.jk.garden1.entity.SendcardEntity;
import com.jk.garden1.service.SendcardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 发卡管理表
 */
@RestController
@RequestMapping("sendcard")
public class SendcardController {
    @Autowired
    private SendcardService sendcardService;
    /**
     * 查询全部
     */
    @RequestMapping("selectSendcardList")
    public List<SendcardEntity> selectSendcardList(){
        return sendcardService.selectSendcardList();
    }
    /**
     * 新增发卡
     */
    @RequestMapping("addSendcard")
    public void addSendcard(SendcardEntity sendcardEntity){
        sendcardService.addSendcard(sendcardEntity);
    }
    /**
     * 发卡修改状态
     */
    @RequestMapping("updateCardIdStatus")
    public void updateCardIdStatus(Integer id){
        sendcardService.updateCardIdStatus(id);
    }
    /**
     * 停用
     * @param id
     */
    @RequestMapping("updateCardStatus")
    public void updateCardStatus(Integer id){
        sendcardService.updateCardStatus(id);
    }
    /**
     * 注销
     * @param id
     */
    @RequestMapping("delCardStatus")
    public void delCardStatus(Integer id){
        
        sendcardService.delCardStatus(id);
    }

    /**
     * es高亮查询
     */
    @RequestMapping("querySendCardList")
    public Object querySendCardList(SendcardEntity sendcard){
        return sendcardService.querySendCardList(sendcard);
    }

}
